package com.azusa.xbiao.entity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class CartPK implements Serializable {
    private int id;
    private int gIds;
    private int isPay;

    @Column(name = "id", nullable = false)
    @Id
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "g_ids", nullable = false)
    @Id
    public int getgIds() {
        return gIds;
    }

    public void setgIds(int gIds) {
        this.gIds = gIds;
    }

    @Column(name = "is_pay", nullable = false)
    @Id
    public int getIsPay() {
        return isPay;
    }

    public void setIsPay(int isPay) {
        this.isPay = isPay;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CartPK cartPK = (CartPK) o;

        if (id != cartPK.id) return false;
        if (gIds != cartPK.gIds) return false;
        if (isPay != cartPK.isPay) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + gIds;
        result = 31 * result + isPay;
        return result;
    }
}
